
import Router from 'vue-router'
import Vue from 'vue'

Vue.use(Router)

//以下是路由配置  
const routes = [
  {
    path: `/`,
    name:'theHome',
    component: () => import('../pcHome/theHome'),
    children:[
      {
        path: `/findPage`,
        name:'findPage',
        component: () => import('../view/findPage'),
      },
      {
        path: `/mainPage`,
        name:'mainPage',
        component: () => import('../view/mainPage'),
      },
      {
        path: `/tiziShow`,
        name:'tiziShow',
        component: () => import('../view/mineson/tiziShow'),
      },
      {
        path: `/minePage1`,
        name:'minePage1',
        component: () => import('../view/minePage1'),
      },
      {
        path: `/minePage2`,
        name:'minePage2',
        component: () => import('../view/minePage2'),
      },
      {
        path: `/minePage3`,
        name:'minePage3',
        component: () => import('../view/minePage3'),
      },
      {
        path: `/minePage`,
        name:'minePage',
        component: () => import('../view/minePage'),
      },
      {
        path: `/friendPage`,
        name:'friendPage',
        component: () => import('../view/friendPage'),
      }
    ]
  },  
  {
    path: `/custMessage`,
    name:'custMessage',
    component: () => import('../view/custMessage'),
  },
  {
    path: `/otherMessage`,
    name:'otherMessage',
    component: () => import('../view/otherMessage'),
  }
]

const router = new Router({
    routes,
    mode:"history"
  });

//   const VueRouterPush = VueRouter.prototype.push 
//   VueRouter.prototype.push = function push (to) {
//     return VueRouterPush.call(this, to).catch(err => err)
// }

//replace
// const VueRouterReplace = VueRouter.prototype.replace
// VueRouter.prototype.replace = function replace (to) {
//   return VueRouterReplace.call(this, to).catch(err => err)
// }
  export default router
